| Fully Qualified Name: | CodeIgniter\Pager\PagerRenderer |
Class PagerRenderer
This class is passed to the view that describes the pagination, and is used to get the link information and provide utility methods needed to work with pagination.
| Name | Description | Defined By |
|---|---|---|
| __construct() | Constructor. | PagerRenderer |
| getCurrent() | Returns the URI of the current page. | PagerRenderer |
| getFirst() | Returns the URI of the first page. | PagerRenderer |
| getLast() | Returns the URI of the last page. | PagerRenderer |
| getNext() | Returns a URL to the "next" page. The next page is NOT, the page after the current page, but is the page that follows the "last" page. | PagerRenderer |
| getNextPage() | Returns a URL to the "next" page. | PagerRenderer |
| getPrevious() | Returns a URL to the "previous" page. The previous page is NOT the page before the current page, but is the page just before the "first" page. | PagerRenderer |
| getPreviousPage() | Returns a URL to the "previous" page. | PagerRenderer |
| hasNext() | Checks to see if there is a "next" page after our "last" page. | PagerRenderer |
| hasNextPage() | Checks to see if there is a "next" page after our "last" page. | PagerRenderer |
| hasPrevious() | Checks to see if there is a "previous" page before our "first" page. | PagerRenderer |
| hasPreviousPage() | Checks to see if there is a "previous" page before our "first" page. | PagerRenderer |
| links() | Returns an array of links that should be displayed. Each link is represented by another array containing of the URI the link should go to, the title (number) of the link, and a boolean value representing whether this link is active or not. | PagerRenderer |
| setSurroundCount() | Sets the total number of links that should appear on either side of the current page. Adjusts the first and last counts to reflect it. | PagerRenderer |
Constructor.
| Parameter Name | Type | Description |
|---|---|---|
| $details | array |
Returns:
Returns the URI of the current page.
Returns: string
Returns the URI of the first page.
Returns: string
Returns the URI of the last page.
Returns: string
Returns a URL to the "next" page. The next page is NOT, the page after the current page, but is the page that follows the "last" page.
You MUST call hasNext() first, or this value may be invalid.
Returns: string|null
Returns a URL to the "next" page.
You MUST call hasNextPage() first, or this value may be invalid.
Returns: string|null
Returns a URL to the "previous" page. The previous page is NOT the page before the current page, but is the page just before the "first" page.
You MUST call hasPrevious() first, or this value may be invalid.
Returns: string|null
Returns a URL to the "previous" page.
You MUST call hasPreviousPage() first, or this value may be invalid.
Returns: string|null
Checks to see if there is a "next" page after our "last" page.
Returns: bool
Checks to see if there is a "next" page after our "last" page.
Returns: bool
Checks to see if there is a "previous" page before our "first" page.
Returns: bool
Checks to see if there is a "previous" page before our "first" page.
Returns: bool
Returns an array of links that should be displayed. Each link is represented by another array containing of the URI the link should go to, the title (number) of the link, and a boolean value representing whether this link is active or not.
Returns: array
Sets the total number of links that should appear on either side of the current page. Adjusts the first and last counts to reflect it.
| Parameter Name | Type | Description |
|---|---|---|
| $count | int|null |
Returns: \PagerRenderer